-- GENERATED SPELL FOR [Kolphis Darkscale] --


function spell0_22019(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_22019', 569, 1)
end

function spell1_22019(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15576,pUnit)
pUnit:RegisterEvent('Sorts_22019', 631, 1)
end

function spell2_22019(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(37704,pUnit)
pUnit:RegisterEvent('Sorts_22019', 2000, 1)
end

function Sorts_22019(pUnit, Event)
local choix_sorts_22019 = math.random(0, 2)
if choix_sorts_22019 == 0 then
pUnit:RegisterEvent('spell0_22019', 1, 1)
end
if choix_sorts_22019 == 1 then
pUnit:RegisterEvent('spell1_22019', 1, 1)
end
if choix_sorts_22019 == 2 then
pUnit:RegisterEvent('spell2_22019', 1, 1)
end
end

function mob22019_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22019', math.random(1500, 3000), 1)
end

function mob22019_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22019_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22019_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22019, 1, 'mob22019_Action')
RegisterUnitEvent(22019, 2, 'mob22019_Leave')
RegisterUnitEvent(22019, 3, 'mob22019_Kill')
RegisterUnitEvent(22019, 4, 'mob22019_Die')
